﻿@using Masa.Blazor.Presets.PageStack
@inherits LayoutComponentBase

<MApp>
    <MMain>
        <PPageStack TabRules="@_tabbedPatterns"
                    FallbackUri="/blazor/examples/page-stack/tab1">
            <MContainer>
                @Body
            </MContainer>
        </PPageStack>
    </MMain>

    <MBottomNavigation App Routable Color="primary">
        <MButton Href="/blazor/examples/page-stack/tab1">Tab 1</MButton>
        <MButton Href="/blazor/examples/page-stack/tab2/Today">Tab 2</MButton>
        <MButton Href="/blazor/examples/page-stack/tab3">Tab 3</MButton>
    </MBottomNavigation>
</MApp>

@code {

    private readonly HashSet<TabRule> _tabbedPatterns =
    [
        new TabRule("/blazor/examples/page-stack/tab1", Persistent: false),
        new TabRule("/blazor/examples/page-stack/tab2", Self: true),
        new TabRule("/blazor/examples/page-stack/tab3"),
    ];

}